import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";
// 定义 interfacePar 的结构

// 定义每个数据项的结构
// interface DataItem {
//   id: number;
//   apnName: string;
//   apnPassword: string;
//   apnUser: string;
//   authType: string;
//   netWorkMode: string;
// }
type Result = {
  success: boolean;
  data?: Array<any>;
};
type Result1 = {
  // success: boolean;
  // data?: Array<any>;
  // data: {
  code: number;
  msg: string;
  // };
};

// 查询
export const getInterfaceSortRead = (data?: object) => {
  return http.request<Result>("post", baseUrlApi("interface/getListType"), {
    data
  });
};

export const interfaceUpdate = (data?: any) => {
  return http.request<Result1>("post", baseUrlApi("interface/update"), {
    data
  });
};
